package com.we823.project.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.we823.project.model.we.RoleResourceModel;

@Entity
@Table(name="we_role")
@NamedQuery(name="RoleModel.findAll", query="SELECT r FROM RoleModel r")
public class RoleModel extends BaseModelWithDate {
	private static final long serialVersionUID = 1L;

	private String name;
	@Column(name="index_url")
	private String index;
	
	private String identity;
	
	@Transient
	private List<RoleResourceModel> roleResources;

	public RoleModel() {
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public List<RoleResourceModel> getRoleResources() {
		return roleResources;
	}

	public void setRoleResources(List<RoleResourceModel> roleResources) {
		this.roleResources = roleResources;
	}

	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}

}